home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 4: GNU Archives / Linux Cubed Series 4 - GNU Archives.iso / gnu / gawk-3.000 / gawk-3 / gawk-3.0.0 / awklib / Makefile.in < prev    next >
Encoding:
Makefile  |  1995-12-19  |  2.6 KB  |  97 lines

  1. # Makefile for GNU Awk support library.
  2. #
  3. # Copyright (C) 1995 the Free Software Foundation, Inc.
  4. # This file is part of GAWK, the GNU implementation of the
  5. # AWK Programming Language.
  6. # GAWK is free software; you can redistribute it and/or modify
  7. # it under the terms of the GNU General Public License as published by
  8. # the Free Software Foundation; either version 2 of the License, or
  9. # (at your option) any later version.
  10. # GAWK is distributed in the hope that it will be useful,
  11. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13. # GNU General Public License for more details.
  14. # You should have received a copy of the GNU General Public License
  15. # along with this program; if not, write to the Free Software
  16. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA
  17.  
  18. SHELL = /bin/sh
  19.  
  20. srcdir = @srcdir@
  21. VPATH = @srcdir@
  22.  
  23. INSTALL = @INSTALL@
  24. INSTALL_PROGRAM = @INSTALL_PROGRAM@
  25. INSTALL_DATA = @INSTALL_DATA@
  26.  
  27. CC = @CC@
  28. CFLAGS = @CFLAGS@
  29.  
  30. prefix = @prefix@
  31. exec_prefix = @exec_prefix@
  32. binprefix =
  33. manprefix =
  34.  
  35. bindir = @bindir@
  36. libdir = @libdir@
  37. mandir = @mandir@/man1
  38. manext = .1
  39. infodir = @infodir@
  40. datadir = @datadir@/awk
  41. libexecdir = @libexecdir@/awk
  42.  
  43. AUXPROGS = pwcat grcat
  44. AUXAWK = passwd.awk group.awk
  45.  
  46. all: stamp-eg $(AUXPROGS) igawk $(AUXAWK)
  47.  
  48. stamp-eg: $(srcdir)/../doc/gawk.texi
  49.     rm -fr eg stamp-eg
  50.     ../gawk -f $(srcdir)/extract.awk $(srcdir)/../doc/gawk.texi
  51.     @echo 'some makes are stupid and will not check a directory' > stamp-eg
  52.     @echo 'against a file, so this file is a place holder. gack.' >> stamp-eg
  53.  
  54. pwcat: $(srcdir)/eg/lib/pwcat.c
  55.     $(CC) $(CFLAGS) $(srcdir)/eg/lib/pwcat.c -o $@
  56.  
  57. grcat: $(srcdir)/eg/lib/grcat.c
  58.     $(CC) $(CFLAGS) $(srcdir)/eg/lib/grcat.c -o $@
  59.  
  60. igawk: $(srcdir)/eg/prog/igawk.sh
  61.     cp $(srcdir)/eg/prog/igawk.sh $@ ; chmod 755 $@
  62.  
  63. passwd.awk: $(srcdir)/eg/lib/passwdawk.in
  64.     (cd $(srcdir)/eg/lib ; \
  65.     sed 's;/usr/local/libexec/awk;$(libexecdir);' < passwdawk.in) > passwd.awk
  66.  
  67. group.awk: $(srcdir)/eg/lib/groupawk.in
  68.     (cd $(srcdir)/eg/lib ; \
  69.     sed 's;/usr/local/libexec/awk;$(libexecdir);' < groupawk.in) > group.awk
  70.  
  71. install: igawk $(AUXPROGS) $(AUXAWK)
  72.     $(INSTALL_PROGRAM) igawk $(bindir)
  73.     for i in $(AUXPROGS) ; do \
  74.         $(INSTALL_PROGRAM) $$i $(libexecdir) ; \
  75.     done
  76.     for i in $(AUXAWK) $(srcdir)/eg/lib/*.awk ; do \
  77.         $(INSTALL_DATA) $$i $(datadir) ; \
  78.     done
  79.  
  80. # libexecdir and bindir are removed in the top level Makefile's uninstall
  81. uninstall:
  82.     rm -fr $(libexecdir)/* $(datadir)/*
  83.     rm -f $(bindir)/igawk
  84.  
  85. clean:
  86.     rm -f $(AUXPROGS) igawk
  87.  
  88. maintainer-clean: clean
  89.     rm -fr eg stamp-eg
  90.  
  91. distclean: clean
  92.     rm -f Makefile
  93.